#include <pcap.h>

class RawListener {
	pcap_t * handle;
	struct bpf_program fp;
	bpf_u_int32 mask;
	bpf_u_int32 net;
	int duration;
public:
	int state;
	int sockfd;
	char errbuf[PCAP_ERRBUF_SIZE];
	RawListener(){ }
	RawListener(const char * dev, int time);
	int recv(char * _buf, unsigned int _sz);
	int finish();
};
